<template>
  <el-form-item>
    <span slot="label">控件类型
    </span>
    <el-select v-model="optionModel.inputType" filterable clearable allow-create default-first-option>
      <el-option v-for="(fv, fvIdx) in fieldValidators"
                 :key="fvIdx"
                 :label="fv.label"
                 :value="fv.value">
      </el-option>
    </el-select>
  </el-form-item>
</template>

<script>
  import i18n from "@/utils/i18n"

  export default {
    name: "inputType-editor",
    mixins: [i18n],
    props: {
      designer: Object,
      selectedWidget: Object,
      optionModel: Object,
    },
    data() {
      return {
        fieldValidators: [
          {value: 'string', label: 'string'},
          {value: 'bigint', label: 'bigint'},
          {value: 'int', label: 'int'},
          {value: 'email', label: 'email'},
          {value: 'decimal', label: 'decimal'},
        ],
      }
    },

  }
</script>

<style scoped>

</style>
